package com.toby.ioc.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @desc: 监听器
 * @author: toby
 * @date: 2019/7/13 2:03
 */
@Component
public class TobyListener implements ApplicationListener<StopEvent> {
    @Override
    public void onApplicationEvent(StopEvent event) {
        if(event.isStop()){
            System.out.println("stop business");
        }
    }
}
